require.config({//模块加载（符合AMD规范）
    baseUrl: 'app',
    paths: {//加载js类库文件
        'angular': 'lib/angular.min',
        'uiRouter': 'lib/angular-ui-router.min',
        'ngMessages': 'lib/angular-messages.min',
        'jquery': 'lib/jquery.min',
        'echarts': 'lib/echarts',
        'amazeui': 'lib/amazeui.min',
        'datetimepicker': 'lib/amazeui.datetimepicker.min',
        'ngTable': 'lib/ng-table.min',
        'ngAnimate': 'lib/angular-animate.min',
        'uiBootstrapTpls': 'lib/ui-bootstrap-tpls',
        'ngFileUpload': 'lib/ng-file-upload.min'
        //'webuploader':'lib/webuploader.min'

    },
    shim: {
        'angular': {
            'exports': 'angular'
        },
        'uiRouter': ['angular'],
        'ngMessages': ['angular'],
        'amazeui': ['jquery'],
        'echarts': ['jquery'],
        'ngAnimate': ['angular'],
        'restangular': ['lodash'],
        'uiBootstrapTpls': ['ngAnimate'],
        'ngFileUpload': ['angular']

    }
});
//定义主页面方法
require(['jquery', 'angular', 'app', 'router', 'MainCtrl', 'echarts','amazeui'],
    function ($, angular) {
        angular.element().ready(function () {
            //手工装配angular app
            angular.bootstrap($('#ng-app'), ['books']);
        });
    });